let SynObj = require("../jce/SynchronousProxy").News
let SynDbInfo = function () {
}
module.exports = SynDbInfo

SynDbInfo.prototype.start = async function (GetRecordDifRsp,SynReq) {

    let sqls = global.difInfo2Sql.dif2sql(GetRecordDifRsp, SynReq);
    let SynRsp = new SynObj.SynRsp();
    try{
        for (let i = 0; i < sqls.length; i++) {
            await global.tafPrx.dbProxy.executeSql(global.getConDif.rstConn, sqls[i])
                .then(res => {
                })
        }
        SynRsp.ret=0;
        SynRsp.msg='success';
    }catch(e){
        SynRsp.ret=1;
        SynRsp.msg=e.message+'\n'+e.stack;
    }
    
    return SynRsp
}
